Skip to content

Add step to build a "production" fedora build on pull requests - #15090

Merged
jan-cerny merged 1 commit into
ComplianceAsCode:masterfrom
Mab879:add_prod_fedora_build
Oct 21, 2026
Merged

jan-cerny merged 1 commit into
ComplianceAsCode:masterfrom
Mab879:add_prod_fedora_build

Conversation

@Mab879

@Mab879 Mab879 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Description:

Add step to build a "production" fedora build on pull requests

Rationale:

To catch issues with packaging in upstream.

Review Hints:

Check that added job ran successfully.

@Mab879 Mab879 added this to the 0.1.83 milestone Sep 3, 2026
@packit-as-a-service

Copy link
Copy Markdown

Failed to load packit config file:

Cannot parse package config. ValidationError({'jobs': {0: {'job': ['Not a valid string.'], 'trigger': ['Missing data for required field.']}}})

For more info, please check out the documentation or contact the Packit team. You can also use our CLI command config validate or our pre-commit hooks for validation of the configuration.

@Mab879
Mab879 force-pushed the add_prod_fedora_build branch 4 times, most recently from bea3ac0 to f2d43ca Compare September 3, 2026 19:07
@Mab879
Mab879 force-pushed the add_prod_fedora_build branch 5 times, most recently from fd7dcc8 to 4ac1fb8 Compare September 3, 2026 20:30
Comment on lines +7 to +8
Version: 0.1.82
Release: 1%{?dist}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will build the version 0.1.82 forever.

In the other spec file, we have this:

# Version placeholder. Copr build version is determined by utils/version.sh. See .packit.yaml config
Version:	0.0.1
Release:	0%{?dist}

Try to have this thing also in this spec file.

@jan-cerny

Copy link
Copy Markdown
Member

/packit build

@jan-cerny jan-cerny self-assigned this Sep 4, 2026
@Mab879

Mab879 commented Sep 4, 2026

Copy link
Copy Markdown
Member Author

Just an FYI will have to switch up the names for the required builds due to this PR.

%define cmake_defines_common -DSSG_SEPARATE_SCAP_FILES_ENABLED=OFF -DSSG_BASH_SCRIPTS_ENABLED=OFF -DSSG_BUILD_SCAP_12_DS=OFF
%define cmake_defines_specific %{nil}
%if 0%{?rhel} && ! %{defined eln}
%define cmake_defines_specific -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL%{rhel}:BOOLEAN=TRUE -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_ANSIBLE_PLAYBOOKS_PER_RULE_ENABLED:BOOL=ON

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be yielding -DSSG_PRODUCT_RHEL46:BOOL=ON

%{rhel} is being set to 46 here according to: https://artifacts.dev.testing-farm.io/9c3be016-7b69-4e04-a739-6e5026e36de3/work-cixgdpip_f/plans/ci/execute/data/guest/default-0/static-checks/rpmbuild-ctest-1/output.txt

We probably need to hardcode the RHEL version here, or build all the products instead

Suggested change
%define cmake_defines_specific -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_PRODUCT_RHEL%{rhel}:BOOLEAN=TRUE -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_ANSIBLE_PLAYBOOKS_PER_RULE_ENABLED:BOOL=ON
%define cmake_defines_specific -DSSG_PRODUCT_DEFAULT:BOOLEAN=FALSE -DSSG_SCIENTIFIC_LINUX_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_CENTOS_DERIVATIVES_ENABLED:BOOL=OFF -DSSG_ANSIBLE_PLAYBOOKS_PER_RULE_ENABLED:BOOL=ON

option(SSG_PRODUCT_DEFAULT "If enabled, all default release products will be built; otherwise only explicitly enabled products will be" TRUE)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No products seem to have been built

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggbecker I don't know if I don't miss anything but I think your concern is orthogonal.

This new spec file is for the new jobs that have "mock" in their name. In these jobs I can see that all products are built.

For example, in the job rpm-build:fedora-rawhide-x86_64:mock we can see many products built in the logs: https://download.copr.fedorainfracloud.org/results/packit/ComplianceAsCode-content-15090-mock/fedora-rawhide-x86_64/10949421-scap-security-guide/builder-live.log.gz

-- Products:
-- Amazon Linux 2023: ON
-- Alibaba Cloud Linux 2: ON
-- Alibaba Cloud Linux 3: ON
-- AlmaLinux OS 9: ON
-- Anolis OS 8: ON
-- Anolis OS 23: ON
-- Debian 11: ON
-- Debian 12: ON
-- Debian 13: ON
-- Example: OFF
-- EKS: ON
-- Fedora: ON
-- Firefox: ON
-- Hummingbird: ON
-- Kylin Server V10: ON
-- KylinSec Server 6: ON
-- OCP4: ON
-- RHCOS4: ON
-- Oracle Linux 7: ON
-- Oracle Linux 8: ON
-- Oracle Linux 9: ON
-- Oracle Linux 10: ON
-- OpenEmbedded: ON
-- openEuler 22.03 LTS: ON
-- openSUSE: ON
-- RHEL 8: ON
-- RHEL 9: ON
-- RHEL 10: ON
-- RHV 4: ON
-- SLES 12: ON
-- SLES 15: ON
-- SLES 16: ON
-- SLE Micro 5: ON
-- SLE Micro 6: ON
-- TencentOS Server 4: ON
-- Ubuntu 22.04: ON
-- Ubuntu 24.04: ON
-- Ubuntu 26.04: ON

@Mab879 Mab879 Sep 8, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we find changes are needed here we to consider coping them Fedora. This the spec file (sans changelog) is from Fedora.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No products seem to have been built

I pulled the RPMs from the copr job, they seem to is data streams.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggbecker To which CI job do you link to?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was one that built and run the static-checks/rpmbuild-ctest-1, I don't know if it is failing anymore.

I pointed out that {rhel} variable was being expanded with version of Fedora and was causing that specific test to not build any product, and on a recently introduced test, if there was no product being built, it threw an error. Previously, I believe there was no error when no product was being built, because ctest would not fail in any way.

I'm not sure if this is still valid after you reiterated here in this pull request.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mock job seems to be building a very old version of scap-security-guide: scap-security-guide-v0.1.61-1

https://dashboard.packit.dev/jobs/copr/3938414

I'm not sure if that is relevant.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggbecker The issue with building RHEL 45 in static-checks job is an issue in contest: RHSecurityCompliance/contest#674 It's a pre-existing issue, not caused by this PR.

@jan-cerny

Copy link
Copy Markdown
Member

/packit build

@Mab879

Mab879 commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

@jan-cerny What is needed to move this forward?

@jan-cerny

Copy link
Copy Markdown
Member

@Mab879 It currently waits on @ggbecker , I will ping him.

@ggbecker

Copy link
Copy Markdown
Member

/packit build

@ggbecker

Copy link
Copy Markdown
Member

@Mab879 It currently waits on @ggbecker , I will ping him.

To be honest I don't know all the details of how the fedora is being built here and I don't know if the current solution is good enough.

I also see some expected checks from the CI are not being run rpm-build:centos-stream-*-x86_64.

I also replied inline, please check it.

@ggbecker

Copy link
Copy Markdown
Member

I also noticed that the 0.1.61 is being fetched by packit here:

https://dashboard.packit.dev/jobs/srpm/689073

2026-09-29 08:55:37.981 repo.py           DEBUG  Parsing git remote URL 'https://github.com/ComplianceAsCode/content' and converting it to https-like URL.
2026-09-29 08:55:37.981 repo.py           DEBUG  Provided input 'https://github.com/ComplianceAsCode/content' is an url.
2026-09-29 08:55:37.981 actions_handler.py DEBUG  Running ActionName.post_upstream_clone hook.
2026-09-29 08:55:37.981 actions_handler.py DEBUG  Running ActionName.post_upstream_clone.
2026-09-29 08:55:37.981 actions_handler.py INFO   Using user-defined script for ActionName.post_upstream_clone: [['bash', '-c', 'cp tests/scap-security-guide_fedora.spec.in scap-security-guide.spec']]
2026-09-29 08:55:37.981 commands.py       DEBUG  Command: bash -c cp tests/scap-security-guide_fedora.spec.in scap-security-guide.spec
2026-09-29 08:55:38.010 upstream.py       DEBUG  No ref given or is not glob pattern
2026-09-29 08:55:38.010 upstream.py       DEBUG  We're about to get latest matching tag in the upstream repository /tmp/tmprp_nbawp.
2026-09-29 08:55:38.010 commands.py       DEBUG  Command: git tag --list --sort=-creatordate --merged=master
2026-09-29 08:55:38.027 logging.py        DEBUG  v0.1.61
2026-09-29 08:55:38.027 logging.py        DEBUG  v0.1.60
2026-09-29 08:55:38.027 logging.py        DEBUG  v0.1.59
2026-09-29 08:55:38.027 logging.py        DEBUG  v0.1.58

Comment thread .packit.yaml
targets:
- fedora-all-x86_64
actions:
post-upstream-clone:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
post-upstream-clone:
get-current-version:
- bash utils/version.sh
post-upstream-clone:

Also add the get-current-version on this step as well

@Mab879

Mab879 commented Oct 2, 2026

Copy link
Copy Markdown
Member Author

I also see some expected checks from the CI are not being run rpm-build:centos-stream-*-x86_64.

That is expected, as I had the change the names of the jobs. We will have adjust names as I mentioned in #15090 (comment).

I can adjust as suggested above.

@Mab879
Mab879 force-pushed the add_prod_fedora_build branch from 4ac1fb8 to 41094cc Compare October 4, 2026 20:09
@openshift-ci openshift-ci Bot added the needs-rebase Used by openshift-ci bot. label Oct 6, 2026
@jan-cerny

Copy link
Copy Markdown
Member

@Mab879 please rebase

@Mab879
Mab879 force-pushed the add_prod_fedora_build branch from 41094cc to 923eeda Compare October 8, 2026 20:47
@packit-as-a-service

Copy link
Copy Markdown

Failed to load packit config file:

Please correct data and retry.

For more info, please check out the documentation or contact the Packit team. You can also use our CLI command config validate or our pre-commit hooks for validation of the configuration.

@openshift-ci openshift-ci Bot removed the needs-rebase Used by openshift-ci bot. label Oct 8, 2026
@Mab879
Mab879 force-pushed the add_prod_fedora_build branch from 923eeda to e79c021 Compare October 8, 2026 20:48
@Mab879
Mab879 force-pushed the add_prod_fedora_build branch from e79c021 to 6e7d3c8 Compare October 8, 2026 20:50
@jan-cerny

Copy link
Copy Markdown
Member

/packit build

@jan-cerny

Copy link
Copy Markdown
Member

@Mab879 please try to wake up the packit by rebasing the PR on latest master branch

@Mab879

Mab879 commented Oct 17, 2026

Copy link
Copy Markdown
Member Author

@Mab879 please try to wake up the packit by rebasing the PR on latest master branch

The rpm-build that are "pending" will never show up on this PR. Right before you merge this PR you will need turn off these required builds as I had to rename them to get this to work so they always so as pending.

@jan-cerny

Copy link
Copy Markdown
Member

@Mab879 How did you rename them and what are their new names?

@Mab879

Mab879 commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

New name: rpm-build:centos-stream-{8,9,10}-x86_64:main

Changed due to the adding of:
https://github.com/Mab879/content/blob/6e7d3c821bd18897a65f79a0410badaf2b669930/.packit.yaml#L17

It's needed so the we can have two copr jobs.

@jan-cerny
jan-cerny merged commit 4f350f0 into ComplianceAsCode:master Oct 21, 2026
78 of 81 checks passed
@Mab879
Mab879 deleted the add_prod_fedora_build branch October 21, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants